package cn.z2huo.knowledge.basic.keyword.breakkeywords;

/**
 * <p>跳出多个 for 循环
 *
 * @author z2huo
 */
public class BreakMultiForTest {

    public static void main(String[] args) {
        int length = 10;

        ok:
        for (int i = 0; i < length; i++) {
            for (int j = 0; j < length; j++) {
                System.out.println("i=" + i + ",j=" + j);
                if (j == 5) {
                    break ok;
//                    break;
                }
            }
        }
    }
}
